<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-09-23
  Time: 1:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="card">
    <div class="card-header">
        <h1 class="card-title h5">类型管理</h1>
        <button type="button" class="btn btn-success" data-toggle="modal" data-target="#add-modal-dialog">
            添加
        </button>
        <a class="btn btn-secondary" href="type!export.action"><i class="icon-cloud-download"></i> 导出为excel</a>
        <form class="form-inline pull-right" id="form-simple-filter" method="post" action="type!findByParameter.action">
            <div class="">
                <select id="simple-filter-type" class="form-control" name="filter-name">
                    <option value="name">名称</option>
                    <option value="remark">备注</option>
                </select>
                <input type="text" class="form-control" name="simple-filter-value" placeholder="查找条件"/>
                <button type="submit" class="btn btn-primary" id="filter-dosimple">
                    <i class="icon-magnifier"></i> 查找
                </button>
            </div>
        </form>
    </div>
    <div class="card-block">
        <div class="row col-md-12">
            <table class="table table-bordered table-striped table-condensed">
                <thead>
                <tr>
                    <th>编号</th>
                    <th>名称</th>
                    <th class="hidden-sm-down">备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody
                <c:forEach var="u" items="${pageUtils.list}">
                    <tr>
                        <td><c:out value="${u.id}"/></td>
                        <td><c:out value="${u.name}"/></td>
                        <td class="hidden-sm-down"><c:out value="${u.remark}"/></td>
                        <td>
                            <a class="btn btn-secondary" data-toggle="modal" data-target="#update-modal-dialog"
                               onclick="update(this)">修改</a>
                            <a class="btn btn-danger" data-toggle="modal" data-target="#delete-confirm"
                               onClick="deleteById(this)">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
    <div class="table-footer hidden-sm-down">
        <ul class="pagination" id="pagination1"></ul>
        <p class="data-details">当前页数：<b id="currentPage"><c:out value="${pageUtils.currPage}"/></b>，
            总记录数：<b id="totalCount"><c:out value="${pageUtils.totalCount}"/></b>，
            总页数：<b id="totalPage"><c:out value="${pageUtils.totalPage}"/></b> 。
        </p>
    </div>
    <div class="table-footer hidden-sm-up">
        <ul class="pagination" id="pagination2"></ul>
        <p class="data-details">当前页数：<b id="currentPage2"><c:out value="${pageUtils.currPage}"/></b>，
            总记录数：<b id="totalCount2"><c:out value="${pageUtils.totalCount}"/></b>，
            总页数：<b id="totalPage2"><c:out value="${pageUtils.totalPage}"/></b> 。
        </p>
    </div>
</div>